package com.yhb.map.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;

public class DataStorage extends SQLiteOpenHelper {
	public static final String DATABASE_NAME = "map_data";
	public static final String DB_TABLE_SEARCH_HISTORY = "search_history";
	public static final String COL_SEARCH_KEY = "search_words";
	public static final String COL_SEARCH_TIME = "search_time";
	public static final String COL_SEARCG_COUNT = "search_count";

	public DataStorage(Context context, String name, CursorFactory factory,
			int version) {
		super(context, name, factory, version);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
        String sql = "drop table if exists " + DB_TABLE_SEARCH_HISTORY;
        db.execSQL(sql);
        //sql = "create table " + DB_TABLE_SEARCH_HISTORY
        //		+ "("
        //		+ 
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int arg1, int arg2) {
		// TODO Auto-generated method stub

	}

}
